<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LINE 1 &quot;libraries\\base\\GHC\\Event\\Windows\\ConsoleEvent.hsc&quot; #-}</span><span>
</span><span id="line-1"></span><span id="local-6989586621679551422"><span id="local-6989586621679551423"><span id="local-6989586621679551424"><span id="local-6989586621679551425"></span></span></span></span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  GHC.Event.Windows.ConsoleEvent</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow, 1994-2002</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  see libraries/base/LICENSE</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  cvs-ghc@haskell.org</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Stability   :  internal</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  non-portable (GHC extensions)</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Windows I/O manager interfaces. Depending on which I/O Subsystem is used</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- requests will be routed to different places.</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Event.Windows.ConsoleEvent</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-20"></span><span>  </span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#ConsoleEvent"><span class="hs-identifier">ConsoleEvent</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>  </span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#start_console_handler"><span class="hs-identifier">start_console_handler</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>  </span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#toWin32ConsoleEvent"><span class="hs-identifier">toWin32ConsoleEvent</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>  </span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#win32ConsoleHandler"><span class="hs-identifier">win32ConsoleHandler</span></a></span><span>
</span><span id="line-24"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html"><span class="hs-identifier">GHC.Conc.Sync</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Enum.html"><span class="hs-identifier">GHC.Enum</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Enum.html#Enum"><span class="hs-identifier">Enum</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IO.html"><span class="hs-identifier">GHC.IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Unsafe.html#unsafePerformIO"><span class="hs-identifier">unsafePerformIO</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.MVar.html"><span class="hs-identifier">GHC.MVar</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier">Num</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Read.html"><span class="hs-identifier">GHC.Read</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Read.html#Read"><span class="hs-identifier">Read</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Word.html"><span class="hs-identifier">GHC.Word</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Word.html#Word32"><span class="hs-identifier">Word32</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Show.html"><span class="hs-identifier">GHC.Show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier">Show</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-keyword">data</span><span> </span><span id="ConsoleEvent"><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#ConsoleEvent"><span class="hs-identifier hs-var">ConsoleEvent</span></a></span></span><span>
</span><span id="line-39"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="ControlC"><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#ControlC"><span class="hs-identifier hs-var">ControlC</span></a></span></span><span>
</span><span id="line-40"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Break"><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#Break"><span class="hs-identifier hs-var">Break</span></a></span></span><span>
</span><span id="line-41"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Close"><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#Close"><span class="hs-identifier hs-var">Close</span></a></span></span><span>
</span><span id="line-42"></span><span>  </span><span class="hs-comment">-- these are sent to Services only.</span><span>
</span><span id="line-43"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Logoff"><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#Logoff"><span class="hs-identifier hs-var">Logoff</span></a></span></span><span>
</span><span id="line-44"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Shutdown"><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#Shutdown"><span class="hs-identifier hs-var">Shutdown</span></a></span></span><span>
</span><span id="line-45"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679551401"><span id="local-6989586621679551403"><span class="annot"><span class="annottext">ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
(ConsoleEvent -&gt; ConsoleEvent -&gt; Bool)
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; Bool) -&gt; Eq ConsoleEvent
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
$c/= :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
== :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
$c== :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>   </span><span class="hs-comment">-- ^ @since 4.3.0.0</span><span>
</span><span id="line-46"></span><span>             </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551381"><span id="local-6989586621679551383"><span id="local-6989586621679551386"><span id="local-6989586621679551389"><span id="local-6989586621679551392"><span id="local-6989586621679551394"><span id="local-6989586621679551396"><span class="annot"><span class="annottext">Eq ConsoleEvent
Eq ConsoleEvent
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; Ordering)
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; Bool)
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; Bool)
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; Bool)
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; Bool)
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent)
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent)
-&gt; Ord ConsoleEvent
ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
ConsoleEvent -&gt; ConsoleEvent -&gt; Ordering
ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent
$cmin :: ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent
max :: ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent
$cmax :: ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent
&gt;= :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
$c&gt;= :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
&gt; :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
$c&gt; :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
&lt;= :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
$c&lt;= :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
&lt; :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
$c&lt; :: ConsoleEvent -&gt; ConsoleEvent -&gt; Bool
compare :: ConsoleEvent -&gt; ConsoleEvent -&gt; Ordering
$ccompare :: ConsoleEvent -&gt; ConsoleEvent -&gt; Ordering
</span><a href="../../ghc-prim/src/GHC.Classes.html#Ord"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></a></span></span></span></span></span></span></span></span><span>  </span><span class="hs-comment">-- ^ @since 4.3.0.0</span><span>
</span><span id="line-47"></span><span>             </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551342"><span id="local-6989586621679551344"><span id="local-6989586621679551348"><span id="local-6989586621679551352"><span id="local-6989586621679551354"><span id="local-6989586621679551364"><span id="local-6989586621679551370"><span id="local-6989586621679551378"><span class="annot"><span class="annottext">Int -&gt; ConsoleEvent
ConsoleEvent -&gt; Int
ConsoleEvent -&gt; [ConsoleEvent]
ConsoleEvent -&gt; ConsoleEvent
ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent]
ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent]
(ConsoleEvent -&gt; ConsoleEvent)
-&gt; (ConsoleEvent -&gt; ConsoleEvent)
-&gt; (Int -&gt; ConsoleEvent)
-&gt; (ConsoleEvent -&gt; Int)
-&gt; (ConsoleEvent -&gt; [ConsoleEvent])
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent])
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent])
-&gt; (ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent])
-&gt; Enum ConsoleEvent
forall a.
(a -&gt; a)
-&gt; (a -&gt; a)
-&gt; (Int -&gt; a)
-&gt; (a -&gt; Int)
-&gt; (a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; a -&gt; [a])
-&gt; Enum a
enumFromThenTo :: ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent]
$cenumFromThenTo :: ConsoleEvent -&gt; ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent]
enumFromTo :: ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent]
$cenumFromTo :: ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent]
enumFromThen :: ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent]
$cenumFromThen :: ConsoleEvent -&gt; ConsoleEvent -&gt; [ConsoleEvent]
enumFrom :: ConsoleEvent -&gt; [ConsoleEvent]
$cenumFrom :: ConsoleEvent -&gt; [ConsoleEvent]
fromEnum :: ConsoleEvent -&gt; Int
$cfromEnum :: ConsoleEvent -&gt; Int
toEnum :: Int -&gt; ConsoleEvent
$ctoEnum :: Int -&gt; ConsoleEvent
pred :: ConsoleEvent -&gt; ConsoleEvent
$cpred :: ConsoleEvent -&gt; ConsoleEvent
succ :: ConsoleEvent -&gt; ConsoleEvent
$csucc :: ConsoleEvent -&gt; ConsoleEvent
</span><a href="GHC.Enum.html#Enum"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Enum</span></a></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.3.0.0</span><span>
</span><span id="line-48"></span><span>             </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551335"><span id="local-6989586621679551337"><span id="local-6989586621679551339"><span class="annot"><span class="annottext">Int -&gt; ConsoleEvent -&gt; ShowS
[ConsoleEvent] -&gt; ShowS
ConsoleEvent -&gt; String
(Int -&gt; ConsoleEvent -&gt; ShowS)
-&gt; (ConsoleEvent -&gt; String)
-&gt; ([ConsoleEvent] -&gt; ShowS)
-&gt; Show ConsoleEvent
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [ConsoleEvent] -&gt; ShowS
$cshowList :: [ConsoleEvent] -&gt; ShowS
show :: ConsoleEvent -&gt; String
$cshow :: ConsoleEvent -&gt; String
showsPrec :: Int -&gt; ConsoleEvent -&gt; ShowS
$cshowsPrec :: Int -&gt; ConsoleEvent -&gt; ShowS
</span><a href="GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.3.0.0</span><span>
</span><span id="line-49"></span><span>             </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679551319"><span id="local-6989586621679551327"><span id="local-6989586621679551330"><span id="local-6989586621679551332"><span class="annot"><span class="annottext">ReadPrec [ConsoleEvent]
ReadPrec ConsoleEvent
Int -&gt; ReadS ConsoleEvent
ReadS [ConsoleEvent]
(Int -&gt; ReadS ConsoleEvent)
-&gt; ReadS [ConsoleEvent]
-&gt; ReadPrec ConsoleEvent
-&gt; ReadPrec [ConsoleEvent]
-&gt; Read ConsoleEvent
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [ConsoleEvent]
$creadListPrec :: ReadPrec [ConsoleEvent]
readPrec :: ReadPrec ConsoleEvent
$creadPrec :: ReadPrec ConsoleEvent
readList :: ReadS [ConsoleEvent]
$creadList :: ReadS [ConsoleEvent]
readsPrec :: Int -&gt; ReadS ConsoleEvent
$creadsPrec :: Int -&gt; ReadS ConsoleEvent
</span><a href="GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.3.0.0</span><span>
</span><span id="line-50"></span><span>             </span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#start_console_handler"><span class="hs-identifier hs-type">start_console_handler</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span id="start_console_handler"><span class="annot"><span class="annottext">start_console_handler :: Word32 -&gt; IO ()
</span><a href="GHC.Event.Windows.ConsoleEvent.html#start_console_handler"><span class="hs-identifier hs-var hs-var">start_console_handler</span></a></span></span><span> </span><span id="local-6989586621679551316"><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679551316"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-54"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Maybe ConsoleEvent
forall a. (Eq a, Num a) =&gt; a -&gt; Maybe ConsoleEvent
</span><a href="GHC.Event.Windows.ConsoleEvent.html#toWin32ConsoleEvent"><span class="hs-identifier hs-var">toWin32ConsoleEvent</span></a></span><span> </span><span class="annot"><span class="annottext">Word32
</span><a href="#local-6989586621679551316"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-55"></span><span>    </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679551315"><span class="annot"><span class="annottext">ConsoleEvent
</span><a href="#local-6989586621679551315"><span class="hs-identifier hs-var">x</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MVar (ConsoleEvent -&gt; IO ())
-&gt; ((ConsoleEvent -&gt; IO ()) -&gt; IO ()) -&gt; IO ()
forall a b. MVar a -&gt; (a -&gt; IO b) -&gt; IO b
</span><a href="GHC.Conc.Sync.html#withMVar"><span class="hs-identifier hs-var">withMVar</span></a></span><span> </span><span class="annot"><span class="annottext">MVar (ConsoleEvent -&gt; IO ())
</span><a href="GHC.Event.Windows.ConsoleEvent.html#win32ConsoleHandler"><span class="hs-identifier hs-var">win32ConsoleHandler</span></a></span><span> </span><span class="annot"><span class="annottext">(((ConsoleEvent -&gt; IO ()) -&gt; IO ()) -&gt; IO ())
-&gt; ((ConsoleEvent -&gt; IO ()) -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679551313"><span class="annot"><span class="annottext">ConsoleEvent -&gt; IO ()
</span><a href="#local-6989586621679551313"><span class="hs-identifier hs-var">handler</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-56"></span><span>                 </span><span class="annot"><span class="annottext">ThreadId
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO ThreadId
</span><a href="GHC.Conc.Sync.html#forkIO"><span class="hs-identifier hs-var">forkIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConsoleEvent -&gt; IO ()
</span><a href="#local-6989586621679551313"><span class="hs-identifier hs-var">handler</span></a></span><span> </span><span class="annot"><span class="annottext">ConsoleEvent
</span><a href="#local-6989586621679551315"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span>                 </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span>    </span><span class="annot"><span class="annottext">Maybe ConsoleEvent
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span id="local-6989586621679551454"><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#toWin32ConsoleEvent"><span class="hs-identifier hs-type">toWin32ConsoleEvent</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551454"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679551454"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679551454"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#ConsoleEvent"><span class="hs-identifier hs-type">ConsoleEvent</span></a></span></span><span>
</span><span id="line-61"></span><span id="toWin32ConsoleEvent"><span class="annot"><span class="annottext">toWin32ConsoleEvent :: forall a. (Eq a, Num a) =&gt; a -&gt; Maybe ConsoleEvent
</span><a href="GHC.Event.Windows.ConsoleEvent.html#toWin32ConsoleEvent"><span class="hs-identifier hs-var hs-var">toWin32ConsoleEvent</span></a></span></span><span> </span><span id="local-6989586621679551299"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679551299"><span class="hs-identifier hs-var">ev</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-62"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679551299"><span class="hs-identifier hs-var">ev</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-63"></span><span>    </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ConsoleEvent -&gt; Maybe ConsoleEvent
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">ConsoleEvent
</span><a href="GHC.Event.Windows.ConsoleEvent.html#ControlC"><span class="hs-identifier hs-var">ControlC</span></a></span><span>
</span><span id="line-64"></span><span class="hs-pragma">{-# LINE 64 &quot;libraries\\base\\GHC\\Event\\Windows\\ConsoleEvent.hsc&quot; #-}</span><span>
</span><span id="line-64"></span><span>    </span><span class="hs-number">1</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Just</span><span> </span><span class="hs-identifier">Break</span><span>
</span><span id="line-65"></span><span class="hs-pragma">{-# LINE 65 &quot;libraries\\base\\GHC\\Event\\Windows\\ConsoleEvent.hsc&quot; #-}</span><span>
</span><span id="line-65"></span><span>    </span><span class="hs-number">2</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Just</span><span> </span><span class="hs-identifier">Close</span><span>
</span><span id="line-66"></span><span class="hs-pragma">{-# LINE 66 &quot;libraries\\base\\GHC\\Event\\Windows\\ConsoleEvent.hsc&quot; #-}</span><span>
</span><span id="line-66"></span><span>    </span><span class="hs-number">5</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Just</span><span> </span><span class="hs-identifier">Logoff</span><span>
</span><span id="line-67"></span><span class="hs-pragma">{-# LINE 67 &quot;libraries\\base\\GHC\\Event\\Windows\\ConsoleEvent.hsc&quot; #-}</span><span>
</span><span id="line-67"></span><span>    </span><span class="hs-number">6</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Just</span><span> </span><span class="hs-identifier">Shutdown</span><span>
</span><span id="line-68"></span><span class="hs-pragma">{-# LINE 68 &quot;libraries\\base\\GHC\\Event\\Windows\\ConsoleEvent.hsc&quot; #-}</span><span>
</span><span id="line-68"></span><span>    </span><span class="hs-identifier">_</span><span>                             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">Nothing</span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#win32ConsoleHandler"><span class="hs-identifier hs-type">win32ConsoleHandler</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.MVar.html#MVar"><span class="hs-identifier hs-type">MVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#ConsoleEvent"><span class="hs-identifier hs-type">ConsoleEvent</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span id="win32ConsoleHandler"><span class="annot"><span class="annottext">win32ConsoleHandler :: MVar (ConsoleEvent -&gt; IO ())
</span><a href="GHC.Event.Windows.ConsoleEvent.html#win32ConsoleHandler"><span class="hs-identifier hs-var hs-var">win32ConsoleHandler</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-72"></span><span>  </span><span class="annot"><span class="annottext">IO (MVar (ConsoleEvent -&gt; IO ())) -&gt; MVar (ConsoleEvent -&gt; IO ())
forall a. IO a -&gt; a
</span><a href="GHC.IO.Unsafe.html#unsafePerformIO"><span class="hs-identifier hs-var">unsafePerformIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ConsoleEvent -&gt; IO ()) -&gt; IO (MVar (ConsoleEvent -&gt; IO ()))
forall a. a -&gt; IO (MVar a)
</span><a href="GHC.MVar.html#newMVar"><span class="hs-identifier hs-var">newMVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ConsoleEvent -&gt; IO ()
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;win32ConsoleHandler&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-73"></span></pre></body></html>